package com.struct.graph.room_list
{
	import com.collection.ACollection;
	import com.collection.FactoryCollection;
	import com.events.RoomListSelectEvent;
	
	import flash.display.DisplayObjectContainer;
	
	import sacu.s.worker.GraphWorker;
	
	public class RoomListGraphWorker extends GraphWorker
	{
		private var _base:RoomListFrame;
		public function RoomListGraphWorker(id:String, base:DisplayObjectContainer)
		{
			super(id, base);
			_base = base as RoomListFrame;
			_base.addEventListener(ACollection.SELECTED, selectedHandler);
		}
		private function selectedHandler(e:RoomListSelectEvent):void{
			factory.disposeFactory();
			FactoryCollection.room.startFactory();
		}
	}
}